vowels_train = load('vowels_train.data');
vowels = load('vowels.data');
vowels_test = load('vowels_test.data');

vowels_train_meas =  vowels_train(:, 1:size(vowels_train, 2)-1);
vowels_train_out = vowels_train(:, size(vowels_train, 2));

vowels_train_meas_meass = sparse(vowels_train_meas);

vowels_meas =  vowels(:, 1:size(vowels, 2)-1);
vowels_out = vowels(:, size(vowels, 2));

vowels_meass = sparse(vowels_meas);

vowels_test_meas =  vowels_test(:, 1:size(vowels_test, 2)-1);
vowels_test_out = vowels_test(:, size(vowels_test, 2));

vowels_test_meass = sparse(vowels_test_meas);

model = train(vowels_train_out, vowels_train_meas_meass, '-s 4');

disp('----------------------------')
disp('PREDICT dla vowels_train.data:')
[l,a]=predict(vowels_train_out, vowels_train_meas_meass, model);
disp('----------------------------')
disp('PREDICT dla vowels.data:')
[l,a]=predict(vowels_out, vowels_meass, model);
disp('----------------------------')
disp('PREDICT dla vowels_test.data:')
[l,a]=predict(vowels_test_out, vowels_test_meass, model);